package com.rdxer.sso.web;

import com.rdxer.common.utils.id.SnowFlake;
import com.rdxer.db.auto.EnableDBAuto;
import com.rdxer.db.migration.EnableDBMigration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;


@SpringBootApplication
@EnableDBAuto
@EnableDBMigration
public class ServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(ServerApplication.class, args);
    }


//    @Bean
//    BCryptPasswordEncoder cryptPasswordEncoder() {
//        return new BCryptPasswordEncoder();
//    }

    @Bean
    SnowFlake idWorker() {
        return new SnowFlake(1, 1);
    }
}
